home *** CD-ROM | disk | FTP | other *** search
/ Maximum CD 2000 November / Maximum CD 2000 Nov.iso / AofE-Conquerers / age2xtrial.exe / CABFILE / MSGAME.CAB / Data / gamedata_x1.drs / Unnamed File 000023.bina < prev    next >
Text File  |  2000-07-18  |  13KB  |  618 lines

  1. (defrule
  2.     (strategic-number sn-number-explore-groups != 1)
  3. =>
  4.     (set-strategic-number sn-number-explore-groups 1)
  5. )
  6.  
  7. (defrule
  8.     (goal wall-build YES)
  9.     (wall-invisible-percentage 2 > 0)
  10. =>
  11.     (set-strategic-number sn-blot-exploration-map 1)
  12. )
  13.  
  14. (defrule
  15.     (unit-type-count-total scout-cavalry-line == 0)
  16.     (can-train scout-cavalry-line)
  17. =>
  18.     (train scout-cavalry-line)
  19. )
  20.  
  21. (defrule
  22.     (unit-type-count-total eagle-warrior-line == 0)
  23.     (can-train eagle-warrior-line)
  24. =>
  25.     (train eagle-warrior-line)
  26. )
  27.  
  28. ;*************************
  29. ;set goal 3
  30. (defrule
  31.     (not (goal military-parity YES) )
  32. =>
  33.     (set-goal military-parity YES)
  34. )
  35.  
  36. (defrule
  37.     (or
  38.         (or
  39.             (and
  40.                 (players-military-population any-enemy > 50)
  41.                 (military-population < 45)
  42.             )
  43.             (and
  44.                 (players-military-population any-enemy > 40)
  45.                 (military-population < 35)
  46.             )
  47.         )
  48.         (and
  49.             (players-military-population any-enemy > 30)
  50.             (military-population < 25)
  51.         )
  52.     )
  53. =>
  54.     (set-goal military-parity NO)
  55. )
  56.  
  57. (defrule
  58.     (or
  59.         (or
  60.             (and
  61.                 (players-military-population any-enemy > 20)
  62.                 (military-population < 15)
  63.             )
  64.             (and
  65.                 (players-military-population any-enemy > 10)
  66.                 (military-population < 5)
  67.             )
  68.         )
  69.         (and
  70.             (players-military-population any-enemy > 0)
  71.             (military-population == 0)
  72.         )
  73.     )
  74. =>
  75.     (set-goal military-parity NO)
  76. )
  77.  
  78. (defrule
  79.     (or
  80.         (or
  81.             (and
  82.                 (players-military-population every-enemy < 30)
  83.                 (military-population > 60)
  84.             )
  85.             (and
  86.                 (players-military-population every-enemy < 25)
  87.                 (military-population > 50)
  88.             )
  89.         )
  90.         (and
  91.             (players-military-population every-enemy < 20)
  92.             (military-population > 40)
  93.         )
  94.     )
  95. =>
  96.     (set-goal military-parity SUPERIOR)
  97. )
  98.  
  99. (defrule
  100.     (or
  101.         (or
  102.             (and
  103.                 (players-military-population every-enemy < 15)
  104.                 (military-population > 30)
  105.             )
  106.             (and
  107.                 (players-military-population every-enemy < 10)
  108.                 (military-population > 20)
  109.             )
  110.         )
  111.         (and
  112.             (players-military-population every-enemy == 0)
  113.             (military-population > 4)
  114.         )
  115.     )
  116. =>
  117.     (set-goal military-parity SUPERIOR)
  118. )
  119. ;enemy army size
  120. (defrule
  121.     (players-military-population any-enemy == 0)
  122.     (players-building-type-count any-enemy watch-tower-line == 0)
  123.     (players-building-type-count any-enemy castle == 0)
  124.     (players-building-type-count any-enemy town-center <= 1)
  125.     (not (goal enemy-soldiers 0) )
  126. =>
  127.     (set-goal enemy-soldiers 0)
  128. )
  129.  
  130. (defrule
  131.     (or
  132.         (players-military-population any-enemy > 0)
  133.         (players-building-type-count any-enemy watch-tower-line > 0)
  134.     )
  135.     (not (goal enemy-soldiers 10) )
  136. =>
  137.     (set-goal enemy-soldiers 10)
  138. )
  139.  
  140. (defrule
  141.     (or
  142.         (or
  143.             (players-military-population any-enemy > 10)
  144.             (players-building-type-count any-enemy watch-tower-line > 2)
  145.         )
  146.         (or
  147.             (players-building-type-count any-enemy castle > 0)
  148.             (players-building-type-count any-enemy town-center > 1)
  149.         )
  150.     )
  151.     (not (goal enemy-soldiers 20) )
  152. =>
  153.     (set-goal enemy-soldiers 20)
  154. )
  155.  
  156. (defrule
  157.     (or
  158.         (or
  159.             (players-military-population any-enemy > 20)
  160.             (players-building-type-count any-enemy watch-tower-line > 4)
  161.         )
  162.         (or
  163.             (players-building-type-count any-enemy castle > 1)
  164.             (players-building-type-count any-enemy town-center > 2)
  165.         )
  166.     )
  167.     (not (goal enemy-soldiers 30) )
  168. =>
  169.     (set-goal enemy-soldiers 30)
  170. )
  171.  
  172. ;enemy navy size
  173. (defrule
  174.     (difficulty < easy)
  175.     (goal 2 YES)
  176.     (not (goal 35 0) )
  177. =>
  178.     (set-goal 35 0)
  179. )
  180.  
  181. (defrule
  182.     (difficulty < easy)
  183.     (or
  184.         (or
  185.             (cc-players-unit-type-count every-enemy galley-line >= 2)
  186.             (cc-players-unit-type-count every-enemy cannon-galleon-line >= 2)
  187.         )
  188.         (or
  189.             (cc-players-unit-type-count every-enemy fire-ship-line >= 2)
  190.             (cc-players-unit-type-count every-enemy longboat-line >= 2)
  191.         )
  192.     )
  193.     (not (goal 35 6) )
  194. =>
  195.     (set-goal 35 6)
  196. )
  197.  
  198. (defrule
  199.     (difficulty < easy)
  200.     (or
  201.         (or
  202.             (cc-players-unit-type-count every-enemy galley-line >= 6)
  203.             (cc-players-unit-type-count every-enemy cannon-galleon-line >= 6)
  204.         )
  205.         (or
  206.             (cc-players-unit-type-count every-enemy fire-ship-line >= 6)
  207.             (cc-players-unit-type-count every-enemy longboat-line >= 6)
  208.         )
  209.     )
  210.     (not (goal 35 12) )
  211. =>
  212.     (set-goal 35 12)
  213. )
  214.  
  215. (defrule
  216.     (difficulty < easy)
  217.     (or
  218.         (or
  219.             (cc-players-unit-type-count every-enemy galley-line >= 12)
  220.             (cc-players-unit-type-count every-enemy cannon-galleon-line >= 12)
  221.         )
  222.         (or
  223.             (cc-players-unit-type-count every-enemy fire-ship-line >= 12)
  224.             (cc-players-unit-type-count every-enemy longboat-line >= 12)
  225.         )
  226.     )
  227.     (not (goal 35 18) )
  228. =>
  229.     (set-goal 35 18)
  230. )
  231. ;***************************
  232. ;see if we ought to attack!
  233. (defrule
  234.     (timer-triggered t-attackgroup)
  235. =>
  236.     (set-goal attack-control YES)
  237.     (set-strategic-number sn-percent-attack-soldiers 100)
  238.     (set-strategic-number sn-percent-attack-boats 0)
  239. )
  240.  
  241. (defrule
  242.     (timer-triggered t-attackgroup)
  243.     (nor
  244.         (stance-toward any-computer enemy)
  245.         (stance-toward any-human enemy)
  246.     )
  247. =>
  248.     (set-goal attack-control NO)
  249. )
  250.  
  251. (defrule
  252.     (timer-triggered t-attackgroup)
  253.     (building-type-count-total wonder > 0)
  254. =>
  255.     (set-goal attack-control NO)
  256. )
  257.  
  258. (defrule
  259.     (timer-triggered t-attackgroup)
  260.     (goal siege-available NO)
  261. =>
  262.     (set-goal attack-control NO)
  263. )
  264.  
  265. #load-if-defined KING-OF-THE-HILL
  266.  
  267. (defrule
  268.     (not (hold-koh-ruin) )
  269.     (military-population > thirty-percent-pop)
  270. =>
  271.     (set-goal attack-control YES)
  272. )
  273.  
  274. #end-if
  275.  
  276. (defrule
  277.     (timer-triggered t-attackgroup)
  278.     (town-under-attack)
  279. =>
  280.     (chat-to-player-using-id every-ally 22406)    ;201
  281.     (chat-to-player-using-id any-human-ally 22115)
  282.         ;"39 Help! The enemy is in my town!"
  283. )
  284.  
  285. #load-if-defined DIFFICULTY-EASIEST
  286.     (defrule
  287.         (timer-triggered t-attackgroup)
  288.     =>
  289.         (set-strategic-number sn-percent-attack-soldiers 1)
  290.         (set-strategic-number sn-percent-attack-boats 1)
  291.         (attack-now)
  292.         (chat-local-to-self "attack now!")
  293.         (set-goal attack-control NO)
  294.     )
  295.  
  296.     #else
  297.     ;*************************
  298.     (defrule
  299.         (timer-triggered t-attackgroup)
  300.         (taunt-detected any-ally 201)
  301.         (defend-soldier-count >= ten-percent-pop)
  302.     =>
  303.         (acknowledge-taunt this-any-ally 201)
  304.         (attack-now)
  305.         (chat-local-to-self "attack now!")
  306.         (set-goal attack-control NO)
  307.     )
  308.  
  309.     (defrule
  310.         (timer-triggered t-attackgroup)
  311.         (population >= pop-cap)
  312.     =>
  313.         (set-strategic-number sn-percent-attack-soldiers 75)
  314.         (set-strategic-number sn-percent-attack-boats 75)
  315.         (attack-now)
  316.         (chat-local-to-self "attack now!")
  317.         (set-goal attack-control NO)
  318.     )
  319.  
  320.     (defrule
  321.         (goal attack-control YES)
  322.         (timer-triggered t-attackgroup)
  323.         (defend-soldier-count >= fifteen-percent-pop)
  324.         (or
  325.             (players-building-type-count any-enemy wonder > 0)
  326.             (or
  327.                 (enemy-captured-relics)
  328.                 (goal military-parity SUPERIOR)
  329.             )
  330.         )
  331.     =>
  332.         (set-strategic-number sn-percent-attack-soldiers 100)
  333.         (set-strategic-number sn-percent-attack-boats 0)
  334.         (attack-now)
  335.         (chat-local-to-self "attack now!")
  336.         (chat-to-player-using-id every-ally 22406)    ;201
  337.         (chat-to-player-using-id any-human-ally 22117)
  338.             ;"39 Attack now!"
  339.         (set-goal attack-control NO)
  340.     )
  341.  
  342.     (defrule
  343.         (goal attack-control YES)
  344.         (goal rush-control RUSHING)
  345.         (timer-triggered t-attackgroup)
  346.         (defend-soldier-count >= 5)
  347.         (or
  348.             (goal enemy-soldiers 0)
  349.             (goal enemy-soldiers 10)
  350.         )
  351.     =>
  352.         (attack-now)
  353.         (chat-local-to-self "attack now!")
  354.         (chat-to-player-using-id every-ally 22406)    ;201
  355.         (chat-to-player-using-id any-human-ally 22116)
  356.             ;"39 Everyone attack now!"
  357.         (set-goal attack-control NO)
  358.     )
  359.  
  360.     (defrule
  361.         (goal attack-control YES)
  362.         (goal rush-control RUSHING)
  363.         (timer-triggered t-attackgroup)
  364.         (or
  365.             (and
  366.                 (goal enemy-soldiers 20)
  367.                 (defend-soldier-count >= 10)
  368.             )
  369.             (and
  370.                 (goal enemy-soldiers 30)
  371.                 (defend-soldier-count >= 15)
  372.             )
  373.         )
  374.     =>
  375.         (attack-now)
  376.         (chat-local-to-self "attack now!")
  377.         (chat-to-player-using-id every-ally 22406)    ;201
  378.         (chat-to-player-using-id any-human-ally 22116)
  379.             ;"39 Everyone attack now!"
  380.         (set-goal attack-control NO)
  381.     )
  382.  
  383.     (defrule
  384.         (goal attack-control YES)
  385.         (timer-triggered t-attackgroup)
  386.         (defend-soldier-count >= 10)
  387.         (or
  388.             (goal enemy-soldiers 0)
  389.             (goal enemy-soldiers 10)
  390.         )
  391.     =>
  392.         (attack-now)
  393.         (chat-local-to-self "attack now!")
  394.         (chat-to-player-using-id every-ally 22406)    ;201
  395.         (chat-to-player-using-id any-human-ally 22116)
  396.             ;"39 Everyone attack now!"
  397.         (set-goal attack-control NO)
  398.     )
  399.  
  400.     (defrule
  401.         (goal attack-control YES)
  402.         (timer-triggered t-attackgroup)
  403.         (or
  404.             (and
  405.                 (goal enemy-soldiers 20)
  406.                 (defend-soldier-count >= 20)
  407.             )
  408.             (and
  409.                 (goal enemy-soldiers 30)
  410.                 (defend-soldier-count >= 30)
  411.             )
  412.         )
  413.     =>
  414.         (attack-now)
  415.         (chat-local-to-self "attack now!")
  416.         (chat-to-player-using-id every-ally 22406)    ;201
  417.         (chat-to-player-using-id any-human-ally 22116)
  418.             ;"39 Everyone attack now!"
  419.         (set-goal attack-control NO)
  420.     )
  421.  
  422.     (defrule
  423.         (difficulty < easy)
  424.         (timer-triggered t-attackgroup)
  425.         (or
  426.             (and
  427.                 (goal 35 0)
  428.                 (defend-warboat-count > 1)
  429.             )
  430.             (and
  431.                 (goal 35 6)
  432.                 (defend-warboat-count >= 4)
  433.             )
  434.         )            
  435.     =>
  436.         (set-strategic-number sn-percent-attack-soldiers 0)
  437.         (set-strategic-number sn-percent-attack-boats 100)
  438.         (attack-now)
  439.         (chat-local-to-self "boats attack now!")
  440.     )
  441.  
  442.     (defrule
  443.         (difficulty < easy)
  444.         (timer-triggered t-attackgroup)
  445.         (or
  446.             (and
  447.                 (goal 35 12)
  448.                 (defend-warboat-count >= 8)
  449.             )
  450.             (and
  451.                 (goal 35 18)
  452.                 (defend-warboat-count >= 12)
  453.             )
  454.         )            
  455.     =>
  456.         (set-strategic-number sn-percent-attack-soldiers 0)
  457.         (set-strategic-number sn-percent-attack-boats 100)
  458.         (attack-now)
  459.         (chat-local-to-self "boats attack now!")
  460.     )
  461.  
  462.     ;desperation
  463.     (defrule
  464.         (timer-triggered t-attackgroup)
  465.         (game-time > 600)
  466.         (building-type-count wonder < 1)
  467.         (unit-type-count-total villager == 0)
  468.     =>
  469.         (set-strategic-number sn-percent-attack-soldiers 100)
  470.         (set-strategic-number sn-percent-attack-boats 100)
  471.         (attack-now)
  472.         (chat-local-to-self "everyone attack now!")
  473.     )
  474. #end-if
  475. ;********************************
  476. #load-if-defined DIFFICULTY-EASIEST
  477. ;attack timer - after 1/2 hour, launch attacks every 15 minutes
  478.     (defrule
  479.         (goal attack-enabled YES)
  480.         (players-current-age every-human >= castle-age)
  481.         (game-time > 1800)
  482.     =>
  483.         (enable-timer t-attackgroup 1)
  484.         (disable-self)
  485.     )
  486.  
  487.     (defrule
  488.         (timer-triggered t-attackgroup)
  489.     =>
  490.         (disable-timer t-attackgroup)
  491.         (enable-timer t-attackgroup 900)
  492.     )
  493. #end-if
  494.  
  495. ;********************************
  496. #load-if-defined DIFFICULTY-EASY
  497. ;attack timer - after 20 minutes, launch attacks every 10 minutes
  498.     (defrule
  499.         (goal attack-enabled YES)
  500.         (players-current-age every-human >= castle-age)
  501.         (game-time > 1200)
  502.     =>
  503.         (enable-timer t-attackgroup 1)
  504.         (disable-self)
  505.     )
  506.  
  507.     (defrule
  508.         (timer-triggered t-attackgroup)
  509.     =>
  510.         (disable-timer t-attackgroup)
  511.         (enable-timer t-attackgroup 120)
  512.     )
  513. #end-if
  514.  
  515. ;********************************
  516. #load-if-defined DIFFICULTY-MODERATE
  517. ;attack timer - once in feudal, or if rushing, launch attacks every 5 minutes
  518.     (defrule
  519.         (goal attack-enabled YES)
  520.         (or
  521.             (current-age >= castle-age)
  522.             (goal rush-control RUSHING)
  523.         )
  524.     =>
  525.         (enable-timer t-attackgroup 1)
  526.         (disable-self)
  527.     )
  528.  
  529.     (defrule
  530.         (timer-triggered t-attackgroup)
  531.     =>
  532.         (disable-timer t-attackgroup)
  533.         (enable-timer t-attackgroup 120)
  534.     )
  535.  
  536. #end-if
  537.  
  538. ;********************************
  539. #load-if-defined DIFFICULTY-HARD
  540.     (defrule
  541.         (goal attack-enabled YES)
  542.         (or
  543.             (current-age >= feudal-age)
  544.             (goal rush-control RUSHING)
  545.         )
  546.     =>
  547.         (enable-timer t-attackgroup 1)
  548.         (disable-self)
  549.     )
  550.  
  551.     (defrule
  552.         (timer-triggered t-attackgroup)
  553.     =>
  554.         (disable-timer t-attackgroup)
  555.         (enable-timer t-attackgroup 300)
  556.     )
  557.  
  558. #end-if
  559.  
  560. ;********************************
  561. #load-if-defined DIFFICULTY-HARDEST
  562.     (defrule
  563.         (goal attack-enabled YES)
  564.         (or
  565.             (current-age >= feudal-age)
  566.             (goal rush-control RUSHING)
  567.         )
  568.     =>
  569.         (enable-timer t-attackgroup 1)
  570.         (disable-self)
  571.     )
  572.  
  573.     (defrule
  574.         (timer-triggered t-attackgroup)
  575.     =>
  576.         (disable-timer t-attackgroup)
  577.         (enable-timer t-attackgroup 300)
  578.     )
  579.  
  580. #end-if
  581.  
  582. ;**************************************
  583. #load-if-not-defined VICTORY-CONQUEST
  584. ;kill the wonder!
  585.  
  586. (defrule
  587.     (or
  588.         (cc-players-building-type-count any-enemy wonder > 0)
  589.         (cc-players-building-type-count any-neutral wonder > 0)
  590.     )
  591. =>
  592.     (set-strategic-number sn-special-attack-type3 1)
  593. )
  594.  
  595. (defrule
  596.     (enemy-captured-relics)
  597. =>
  598.     (set-strategic-number sn-special-attack-type1 1)
  599. )
  600.  
  601. (defrule
  602.     (cc-players-building-type-count any-enemy wonder == 0)
  603.     (cc-players-building-type-count any-neutral wonder == 0)
  604.     (not (enemy-captured-relics) )
  605. =>
  606.     (set-strategic-number sn-special-attack-type1 0)
  607. )
  608.  
  609. #load-if-not-defined TEAMS-LOCKED
  610. (defrule
  611.     (cc-players-building-type-count any-neutral wonder > 0)
  612. =>
  613.     (set-stance this-any-neutral enemy)
  614. )
  615. #end-if
  616. #end-if
  617.  
  618.